/*
 * set集合
 * */
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

public class SetTest {
    public static void main(String[] args) {
        Set<String> s = new HashSet<String>();
        s.add("a");
        s.add("b");
        Iterator<String> it = s.iterator();
        while (it.hasNext()) {
            String str = it.next();
            System.out.println(str);
        }
        for (String str1:s) {
            System.out.println(str1);
        }
    }


}
